<template>
  <div>
    <a-modal
      :width="1000"
      :title="imgtype == 2 ? '图片详情' : '帖子内容详情'"
      :visible="visible"
      @ok="handleOk"
      @cancel="handleCancel"
      :footer="false"
    >
     <img v-show="imgtype == 2" :src="item.pricturePath" v-for="(item,index) in imgdata" @click="opneimg(item.pricturePath)" style="width: 50px;height: 50px;margin-left: 20px;" :key="index" alt="">
     <div v-show="imgtype == 1">{{content}}</div>
    </a-modal>
  </div>
</template>

<script>
export default {
    props:{
        imgdata:{
            type:Array,
            default:true
        },
        imgtype:{
          type:String,
          default:true
        },
        content:{
          type:String,
          default:true
        }
    },
  data() {
    return {
      visible: false,
    };
    
  },
  created(){
    console.log(this.imgdata,'imgdata');
  },
  methods:{
    handleCancel(){
        this.visible = false
    },
    opneimg(imgpath)
    {
        window.open(imgpath)
    }
  }
};
</script>

<style lang="scss" scoped></style>
